package router

import (
	v1 "gitee.com/daka1004/devops-runner/api/v1"
	"github.com/gin-gonic/gin"
)

type RunnerRouter struct {
}

func (a *RunnerRouter) InitRunnerRouter(Router *gin.RouterGroup) {
	appRouter := Router.Group("")
	//appRouter.Use(middleware.JwtAuth()).Use(middleware.SessionAuth()).Use(middleware.PasswordExpired())
	baseApi := v1.ApiGroupApp.BaseApi
	{
		//appRouter.POST("/1234/execute", baseApi.Execute)
		//appRouter.POST("/:pipelineId/execute", baseApi.Executebak)
		appRouter.POST("/:executeId/execute", baseApi.Execute)
		appRouter.GET("/:executeId/nodeLog", baseApi.GetNodeLog)
		appRouter.DELETE("/:executeId/nodeLog", baseApi.DeleteNodeLog)
		appRouter.POST("/threeInOneStaticAnalysis", baseApi.ThreeInOneStaticAnalysis)
		appRouter.POST("/threeInOneMeasurement", baseApi.ThreeInOneMeasurement)
		appRouter.GET("/test", baseApi.Test)
		appRouter.GET("/test2", baseApi.Test2)
		appRouter.GET("/metrics", baseApi.Metrics)
		//appRouter.GET("/metrics", baseApi.Metrics)

	}
}
